<template>
  <div>
    <Row>
      <Col span="10">
        <dict-table @on-row-click="onRowClick" />
      </Col>
      <Col span="13" offset="1">
        <dict-item-table :currentDictType='currentDictType' :currentDict='currentDict'/>
      </Col>
    </Row>
  </div>
</template>

<script>
// 导入组件
import DictTable from './dict_table'
import DictItemTable from './dict_item_table'

export default {
  name: 'tables_page',
  components: {
    'dict-table': DictTable,
    'dict-item-table': DictItemTable
  },
  data () {
    return {
      currentDictType: '',
      currentDict: {
        dictName: '',
        dictType: ''
      }
    }
  },
  methods: {
    onRowClick (row, index) {
      console.log(row)
      this.currentDictType = row.dictType
      this.currentDict = row
    }
  },
  mounted () {
  }
}
</script>

<style>
.demo-drawer-profile {
    font-size: 14px
}

.demo-drawer-profile .ivu-col {
    margin-bottom: 12px
}

</style>
